Working with ILOG Views and SNiFF+

Creating file types for the ILOG Views application
In order for ILOG Views to send automatic notifications to SNiFF+ projects when files are generated in it, you must create SNiFF+ file types for the ILOG Views application and panel description files.
The signatures of the files types must map to the signatures of the ILOG Views panel description files:

*.ilv
*.iva

We recommend that you create a subdirectory in your SNiFF+ project directory for data files of these file types. Then, enter the name of this directory in the Directory field of both file types. The files generated by ILOG Views will then be automatically added to your SNiFF+ project.
Furthermore, make sure that ILOG Views generates the source and header files in the SNiFF+ project directory, and the data files in the subdirectory for data files.
Browsing code generated with ILOG Views in SNiFF+
If you intend to generate code with ILOG Views which you later plan to browse in SNiFF+:

- Start SNiFF+.
- Use the custom menu to start ivstudio.
- Open the SNiFF+ project to which the generated code files are to be added. If the generated files are not newer versions of files that are already part of the SNiFF+ project, you will have to add them to the project.

  | Note
  | If you are adding new files to the SNiFF+ project, first check out its project description file!

- If the generated files are to override local files that have already been checked in with SNiFF+, check out these files to your Private Working Environment.
  You are now ready to generate code with ILOG Views. When you generate code, SNiFF+ will:
  - add the generated files to the SNiFF+ project
  - reparse the generated files if identically-named files already exist in the project
  - update the project's make support files
  If your include path specification is no longer up-to-date, press the Generate... button in the project's make attributes to regenerate the include directives.
  Setting up the make support for ILOG Views
  The ILOG Views include and library directories need to be defined in your platform-specific makefile. SNiFF+ will then use these macros when generating the SNiFF+ project's makefile.
  To define the ILOG Views include and library directories:
  Enter the following definitions in your
$SNIFF_DIR/make_support/$PLATFORM.mk file:

# ILOG Views home directory
ILV_HOME = $(ILVHOME)
# binary, library and include directories
ILV_BINDIR = $(ILV_HOME)/bin/$(ILB_SYSTEM)
ILV_LIBDIR = $(ILV_HOME)/lib/$(ILB_SYSTEM)
ILV_INCDIR = $(ILV_HOME)/include

- Insert the include path macro (defined in the platform-specific makefile) in the Include Directive(s) section of the project makefile.

# Include directive(s)
INCLUDE = $(SNIFF_INCLUDE) -I$(ILV_INCDIR)

If the project's target is an executable, enter

$(ILV_LIBS)

in the field to the right of the Executable field in the project's make attributes.
The ILOG Views libraries will be linked to the project's executable.

If the project's target is a relinkable object, enter

$(ILV_LIBS)

in the field to the right of the Relinkable Object field in the project's make attributes.
The ILOG Views libraries will be linked to the project's relinkable object.
Exploring the ILOG Views libraries
In order to extract symbol information from the ILOG Views libraries, you will have to create a SNiFF+ project that contains the header files describing the interface to the libraries.
Furthermore, when creating the SNiFF+ project, you should specify a destination directory for SNiFF+ - generated files. Since the ILOG Views include directory is generally read-only for most users, having SNiFF+ store its generated files in it is not advisable.
To create an ILOG Views interface project, please complete the following steps:

Create a directory for the SNiFF+ - generated files (e.g., PDFs and .sniffdir). Make this directory read-only for all members of your development team (except yourself):

mkdir ilv_lib
In SNiFF+'s Launch Pad, choose New Project... > with Defaults... from the Project menu.
In the Directory dialog that appears, select the directory containing the ILOG Views header files.
Example:

/usr/ilog/views30/include/ilviews

The General view of Attributes of New Project dialog appears.

- Make sure that the new project is an absolute project (specified by the Project Type attribute).
- In the Destination Directory field, enter the absolute path of SNiFF+ - generated files director - you created in step 1.) above.
  Example:

/<anywhere_in_your_file_system>/ilv_lib

- Under the General node, select Advanced.
- Enter the same path from the previous step in the Generated Files Directory. Make sure that the Tool Status Files are also saved there (default).
- Select the Parser node.
- Enable the Use Standard Header Dependencies check-box.
- Enable the Preprocess Source Code before Parsing check-box.
- If necessary, select Directives under the Build Options node and enter preprocessor directives in the Preprocessor Directive(s) field.
- Press the Ok button at the bottom of the view to generate the project.
  SNiFF+ will now generate the project. SNiFF+ immediately opens the project after it has been generated.
- Open the Project Attributes dialog for the project.
- Select Directives under the Build Options node and press the Generate... button.
  The include directives for the project will be generated. In most cases, the include path for ILOG Views is:

-I..
Press the Ok button to save the project attributes.
In the Project Editor, force reparse the project by choosing the Force Reparse command in the Project menu.
The project will be reparsed with the correct include path for the preprocessor. All symbols in the project can now be properly displayed in SNiFF+.
Open the Project Attributes dialog for the project.
Enable the Read Only check-box in the General view to make the project read-only and press the Ok button to save the project attributes.
In the Launch Pad, choose the Save Project project-name command from the Project menu to save the project.
Make this project a subproject of your ILOG Views-SNiFF+ project.

You can now browse the entire interface to the ILOG Views library.